package com.whm.hrmanagement.service.impl;

import java.util.List;
import com.whm.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.whm.hrmanagement.mapper.OaZygxxgzjlMapper;
import com.whm.hrmanagement.domain.OaZygxxgzjl;
import com.whm.hrmanagement.service.IOaZygxxgzjlService;

/**
 * hrmanagementService业务层处理
 * 
 * @author whm
 * @date 2024-02-03
 */
@Service
public class OaZygxxgzjlServiceImpl implements IOaZygxxgzjlService 
{
    @Autowired
    private OaZygxxgzjlMapper oaZygxxgzjlMapper;

    /**
     * 查询hrmanagement
     * 
     * @param id hrmanagement主键
     * @return hrmanagement
     */
    @Override
    public OaZygxxgzjl selectOaZygxxgzjlById(Long id)
    {
        return oaZygxxgzjlMapper.selectOaZygxxgzjlById(id);
    }

    /**
     * 查询hrmanagement列表
     * 
     * @param oaZygxxgzjl hrmanagement
     * @return hrmanagement
     */
    @Override
    public List<OaZygxxgzjl> selectOaZygxxgzjlList(OaZygxxgzjl oaZygxxgzjl)
    {

        List<OaZygxxgzjl> oaZygxxgzjls=oaZygxxgzjlMapper.selectOaZygxxgzjlList(oaZygxxgzjl);

        return oaZygxxgzjls;
    }

    /**
     * 新增hrmanagement
     * 
     * @param oaZygxxgzjl hrmanagement
     * @return 结果
     */
    @Override
    public int insertOaZygxxgzjl(OaZygxxgzjl oaZygxxgzjl)
    {

        oaZygxxgzjl.setYuangongTxt(oaZygxxgzjlMapper.getNameTranslate(oaZygxxgzjl.getYuangong()));
        oaZygxxgzjl.setCreateTime(DateUtils.getNowDate());
        return oaZygxxgzjlMapper.insertOaZygxxgzjl(oaZygxxgzjl);
    }

    /**
     * 修改hrmanagement
     * 
     * @param oaZygxxgzjl hrmanagement
     * @return 结果
     */
    @Override
    public int updateOaZygxxgzjl(OaZygxxgzjl oaZygxxgzjl)
    {
        oaZygxxgzjl.setUpdateTime(DateUtils.getNowDate());
        return oaZygxxgzjlMapper.updateOaZygxxgzjl(oaZygxxgzjl);
    }

    /**
     * 批量删除hrmanagement
     * 
     * @param ids 需要删除的hrmanagement主键
     * @return 结果
     */
    @Override
    public int deleteOaZygxxgzjlByIds(Long[] ids)
    {
        return oaZygxxgzjlMapper.deleteOaZygxxgzjlByIds(ids);
    }

    /**
     * 删除hrmanagement信息
     * 
     * @param id hrmanagement主键
     * @return 结果
     */
    @Override
    public int deleteOaZygxxgzjlById(Long id)
    {
        return oaZygxxgzjlMapper.deleteOaZygxxgzjlById(id);
    }
}
